﻿@model ShivamEMR.Model.Domain.CompanyDomain.Company

@{
    ViewBag.Title = "Create";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h1>Create New Company</h1>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>


@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
<div class='metro-pivot'>
<div class='pivot-item'>
     @*<h3>Section 1</h3> *@
        <table width="100%" cellpadding="4" cellspacing="4">
		<tr>
<td>

        <div class="editor-label">
            @Html.LabelFor(model => model.Name)
        </div>
</td>
<td>

        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>
</td>
    </tr><tr>
	<td>

        <div class="editor-label">
            @Html.LabelFor(model => model.ShortName)
        </div>
</td>
<td>

        <div class="editor-field">
            @Html.EditorFor(model => model.ShortName)
            @Html.ValidationMessageFor(model => model.ShortName)
        </div>
</td>
</tr>

<tr>
<td>

        <div class="editor-label">
            @Html.LabelFor(model => model.Description)
        </div>
</td>
<td>

        <div class="editor-field">
            @Html.EditorFor(model => model.Description)
            @Html.ValidationMessageFor(model => model.Description)
        </div>
</td>
    </tr>
    
    <tr>

<td>

        <div class="editor-label">
            @Html.LabelFor(model => model.Group)
        </div>
</td>
<td>

       <div class="editor-field">
    @Html.DropDownListFor(model => model.CompanyGroupID, ((IEnumerable<ShivamEMR.Model.Domain.CompanyDomain.CompanyGroup>)ViewBag.PossibleCompanyGroups).Select(option => new SelectListItem {
        Text = Html.DisplayTextFor(_ => option.Group).ToString(), 
        Value = option.ID.ToString(),
        Selected = (Model != null) && (option.ID == Model.CompanyGroupID)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.CompanyGroupID)
</div>
</td>
    </tr>


    <tr>
	<td>

        <div class="editor-label">
            @Html.LabelFor(model => model.Notes)
        </div>
</td>
<td>

        <div class="editor-field">
            @Html.EditorFor(model => model.Notes)
            @Html.ValidationMessageFor(model => model.Notes)
        </div>
</td>
</tr>


    
   @* <tr>
	<td>

        <div class="editor-label">
            @Html.LabelFor(model => model.CompanyPictureID)
        </div>
</td>
<td>

        <div class="editor-field">
            @Html.EditorFor(model => model.CompanyPictureID)
            @Html.ValidationMessageFor(model => model.CompanyPictureID)
        </div>
</td>
     </tr>*@
     
     </table></div>     
   </div>
        <p>
            <input type="submit" value="Create" />
        </p>
    
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
<script>
$(function () {
    $("div.metro-pivot").metroPivot();
});
</script>
